<?php
// This is the class that will be used to send the response.

class Response
{
    public $response;

    public function  __construct($response)
    {

        $this->response = $response;

    }
}

final class Status
{
   public $statusCode;
   public $statusMessage;

   public function  __construct($code, $msg)
   {
        $this->statusCode = $code;
        $this->statusMessage = $msg;
    }
}

final class LoginResponse
{
    public $status;
    public $login;
    
    public function __construct($status, $login)
    {
        $this->status = $status;
        $this->login = $login;
    }
     
}

final class Login
{
    public $userid;
    public $sessionid; 
    
    public function __construct($userid, $sessionid)
    {
        $this->userid = $userid;
        $this->sessionid = $sessionid;
    }
}
final class GenericResponse
{

  public $status;

  public function  __construct($status)
  {
     $this->status = $status;
  }
};

// This is the Get Project Response 
final class ArrayProjectResponse
{
    public $status;
    public $projectCount;
    public $projects;
    
    public function __construct($status,$projects)
    {
        $this->status = $status;
        $this->projectCount = count($projects);
        $this->projects = $projects;
    }
}

final class ProjectResponse
{
    public $status;
    public $project;
    
    public function __construct($status, $project)
    {
        $this->status = $status;
        $this->project = $project;
    }
}

// The base project 
final class Project
{
    public $id;
    public $name;
    public $desc;    
    public $start;
    public $end;
    public $daysleft;    
    public $done;  
    public $budget;
    public $status;
    
    public function __construct($id, $name,$desc,$startdate,$enddate,$daysleft,$done,$budget,$status)
    {
        $this->id = $id;
        $this->name = $name;
        $this->desc = $desc;
        $this->done = $done;
        $this->start = $startdate;
        $this->end = $enddate;
        $this->daysleft = $daysleft;
        $this->budget = $budget;
        $this->status = $status;
                
    }
    
}

final class ArrayMilestoneResponse
{
    public $status;
    public $milestoneCount;
    public $milestones;
    
    public function __construct($status, $milestones)
    {
        $this->status = $status;
        $this->milestoneCount = count($milestones);
        $this->milestones = $milestones;
    }
}

final class MilestoneResponse
{
    public $status;    
    public $milestone;
    
    public function __construct($status, $milestone)
    {
        $this->status = $status;
        $this->milestone = $milestone;        
    }
}


final class Milestone
{
    public $id;
    public $pid;
    public $name;
    public $desc;
    public $start;
    public $end;
    public $status;
    
    public function __construct($id, $pid, $name, $desc, $start, $end, $status)
    {
        $this->id = $id;
        $this->pid = $pid;
        $this->name = $name;
        $this->desc = $desc;
        $this->start = $start;
        $this->end = $end;
        $this->status = $status;
    }
    
}

final class ArrayTasklistResponse
{
    public $status;
    public $tasklistCount;
    public $tasklists;
    
    public function __construct($status, $Tasklists)
    {
        $this->status = $status;
        $this->tasklistCount = count($Tasklists);
        $this->tasklists = $Tasklists;
    }
}
final class TasklistResponse
{
    public $status;    
    public $tasklist;
    
    public function __construct($status, $tasklist)
    {
        $this->status = $status;        
        $this->tasklist = $tasklist;
    }
}

final class Tasklist
{
    public $id;
    public $pid;
    public $mid;
    public $name;
    public $desc;
    public $start;
    public $status;
    public $access;
    
    
    public function __construct($id,$pid,$mid,$name,$desc,$start, $status, $access)
    {
        $this->id = $id;
        $this->pid = $pid;
        $this->mid = $mid;
        $this->name = $name;
        $this->desc = $desc;
        $this->start = $start;
        $this->status = $status;
        $this->access = $access;
        
    }

}
final class ArrayTaskResponse
{
    public $status;
    public $taskCount;
    public $tasks;
    
    public function __construct ($status, $tasks)
    {
        $this->status = $status;
        $this->taskCount = count($tasks);
        $this->tasks = $tasks;
    }
}

final class TaskResponse
{
    public $status;
    public $task;
    
    public function __construct ($status, $task)
    {
        $this->status = $status; 
        $this->task = $task;
    }
}

final class Task
{
    public $id;
    public $pid;
    public $tlid;
    public $name;
    public $desc; 
    public $start;
    public $end;   
    public $status;
    
    public function __construct($id,$pid,$tlid,$name, $desc,$start,$end, $status)
    {
        $this->id = $id;
        $this->pid = $pid;
        $this->tlid = $tlid;
        $this->start = $start;
        $this->end = $end;
        $this->name = $name;
        $this->desc = $desc;
        $this->status = $status;
    }        
}

final class RoleResponse
{
    public $status;
    public $name;
    public $projects;
    public $tasks;
    public $milestones;
    public $messages;
    public $files;
    public $timetracker; 
    public $chat;
    public $admin;
    
    public function __construct($status, $name, $projects,$tasks,$milestones, $messages,$files, $timetracker, $chat, $admin)
    {
        $this->name = $name;
        $this->status = $status;
        $this->projects = $projects;
        $this->tasks = $tasks;
        $this->milestones = $milestones;
        $this->messages = $messages;
        $this->files = $files;
        $this->timetracker = $timetracker;
        $this->chat = $chat;
        $this->admin = $admin;
    }
}
 
final class Role
{
    public $add;
    public $edit;
    public $delete;
    public $close;
    public $read;
    
    public function __construct($add, $edit, $delete, $close, $read)
    {
        $this->add = $add;
        $this->edit = $edit;
        $this->delete = $delete;
        $this->close = $close;
        $this->read = $read;
    }
    
}

final class ValidateResponse
{
    public $status;
    public $VersionInfo;
    
    public function __construct($status, $Version)
    {
        $this->status = $status;
        $this->VersionInfo = $Version;
    }
  
    
}

final class Version
{
    public $OWNER;
    public $MAJOR;
    public $MINOR;
    public $BUILD;
    public $TYPE;
    public $MESSAGE;
    
    public function __construct($owner, $major, $minor, $build, $type, $message)
    {
        $this->OWNER = $owner;
        $this->MAJOR = $major;
        $this->MINOR = $minor;
        $this->BUILD = $build;
        $this->TYPE = $type;
        $this->MESSAGE = $message;
                
    }    
}
 

/* NOT IN USE BUT WILL BE IN THE FUTURE. 
 *

final class UsersResponse
{
    public $status;
    public $userCount;
    public $users;

    public function  __construct(Status $st, $usrArray)
    {
        $this->status = $st;
        $this->users = $usrArray;
        $this->userCount = count($usrArray);

    }
}

final class User
{
    public $id;
    public $username;
    public $location;

    public function  __construct($id, $username, $loc) {
        $this->id = $id;
        $this->username = $username;
        $this->location = $loc;
    }

}
 */

?>